home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / tcp / mFinger10.lha / mFinger / Rexx / mFinger.AMIRX
Text File  |  1996-11-26  |  1KB  |  58 lines

  1. /* mFinger.AMIRX -- AmIRC finger script for interfacing with mFinger
  2. ** 
  3. ** Programmed by Troels Walsted Hansen <troels@stud.cs.uit.no>.
  4. ** Some code borrowed from Finger.AMIRX by Alexander "Handtuch" Sorg
  5. ** and Troy "Doogie" Davis.
  6. **
  7. ** This script will first see if mFinger is running, if it is it will 
  8. ** be told to finger the address in question. If mFinger isn't running 
  9. ** it will be launched with the address as a commandline argument.
  10. **
  11. ** Note that since mFinger works 100% asynchronously you won't get any
  12. ** error messages or finger output back into your AmIRC window.
  13. */
  14.  
  15. /* change this command to suit your setup */
  16.  
  17. mFingerCmd = "SC:Troels/mFinger/mFinger"
  18.  
  19. /* don't change anything below here */
  20.  
  21. parse arg args
  22. options results
  23.  
  24. if args = "" then 
  25. do
  26.    "echo P="d2c(27)"b«Error» Usage: FINGER nick"
  27.    exit
  28. end
  29.  
  30. USERHOST args
  31. NickHost = result
  32.  
  33. "echo P="d2c(27)"b«Finger» Fingering "d2c(2)Args d2c(2)"("NickHost")."
  34.  
  35. /* see if mFinger is running */
  36.  
  37. p=show('P',,)
  38. if pos("MFINGER.", p) > 0 then 
  39. do
  40.     address(word(substr(p,pos("MFINGER.",p)),1))
  41.     FINGER NickHost
  42. end
  43. else 
  44. do
  45.     amircport = address()
  46.  
  47.     address command
  48.     mFingerCmd || " " || NickHost
  49.  
  50.     if(rc > 0) then
  51.     do
  52.         address(amircport)
  53.         "echo P="d2c(27)"b«Finger» Failed to launch mFinger with the commandline "d2c(2) || mFingerCmd || d2c(2)"."
  54.         exit 20
  55.     end
  56.     else exit
  57. end
  58.